#!/bin/bash
set -xeuo pipefail
set -o errexit

curl -XDELETE http://localhost:9200/search-*?pretty 

curl -XPUT http://localhost:9200/search-10?pretty -H 'Content-Type: application/json' -d'
{  
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
'

curl -XPUT http://localhost:9200/search-11?pretty -H 'Content-Type: application/json' -d'
{  
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
'
curl -XPUT http://localhost:9200/search-20?pretty -H 'Content-Type: application/json' -d'
{  
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
'
curl -XPUT http://localhost:9200/search-21?pretty -H 'Content-Type: application/json' -d'
{  
  "settings": {
    "number_of_shards": 1,
    "number_of_replicas": 0
  }
}
'
#file:///hdd/test/built-docs-master/raw/en/elasticsearch/reference/current/search-search.html
# 支持多个索引
# 每个索引执行*的通配符
curl -XGET "http://localhost:9200/search1*,search2*/_search?pretty" -H 'Content-Type: application/json' -d'
{  
  "query": {    
    "match_all": {    

    }  
 }
}'